import Vue from 'vue'
import App from './App.vue'
import router from "@/router";
import store from "@/vuex/store";
import moment from "moment";
import VueDraggableResizable from 'vue-draggable-resizable';
import {
  Affix,
  Anchor,
  AutoComplete,
  Alert,
  Avatar,
  BackTop,
  Badge,
  Breadcrumb,
  Button,
  Calendar,
  Card,
  Collapse,
  Comment,
  Carousel,
  Cascader,
  Checkbox,
  Col,
  ConfigProvider,
  DatePicker,
  Divider,
  Dropdown,
  Empty,
  Form,
  FormModel,
  Icon,
  Input,
  InputNumber,
  Layout,
  List,
  LocaleProvider,
  Menu,
  Mentions,
  Modal,
  Notification,
  Pagination,
  Popconfirm,
  Popover,
  Progress,
  Radio,
  Message,
  Rate,
  Row,
  Select,
  Slider,
  Spin,
  Statistic,
  Steps,
  Switch,
  Table,
  Transfer,
  Tree,
  TreeSelect,
  Tabs,
  Tag,
  TimePicker,
  Timeline,
  Tooltip,
  Upload,
  Drawer,
  Skeleton,
  Result,
  Descriptions,
  PageHeader,
  Space,
} from 'ant-design-vue';
import encry from '@/utils/encryUtil'
import * as echarts from 'echarts'


Vue.config.productionTip = false
Vue.prototype.$message=Message
Vue.prototype.$notification=Notification
Vue.prototype.$confirm = Modal.confirm
Vue.prototype.$success = Modal.success
Vue.prototype.$moment = moment;
Vue.prototype.$encry = encry.encry;
Vue.prototype.$dencry = encry.decrypt;
Vue.prototype.$echarts = echarts


Vue.use(Descriptions)
Vue.use(PageHeader)
Vue.use(Skeleton)
Vue.use(TimePicker)
Vue.use(Timeline)
Vue.use(Tooltip)
Vue.use(Upload)
Vue.use(Transfer)
Vue.use(Tree)
Vue.use(TreeSelect)
Vue.use(Spin)
Vue.use(Statistic)
Vue.use(Rate)
Vue.use(Pagination)
Vue.use(Mentions)
Vue.use(LocaleProvider)
Vue.use(Dropdown)
Vue.use(Empty)
Vue.use(Calendar)
Vue.use(Card)
Vue.use(Collapse)
Vue.use(Comment)
Vue.use(Carousel)
Vue.use(Cascader)
Vue.use(BackTop)
Vue.use(Badge)
Vue.use(Breadcrumb)
Vue.use(Affix)
Vue.use(Anchor)
Vue.use(AutoComplete)
Vue.use(Slider)
Vue.use(Space)
Vue.use(Divider)
Vue.use(Tag)
Vue.use(FormModel)
Vue.use(InputNumber)
Vue.use(Table)
Vue.use(Select)
Vue.use(Alert)
Vue.use(Tabs)
Vue.use(Progress)
Vue.use(Result)
Vue.use(Popover)
Vue.use(Row)
Vue.use(Col)
Vue.use(Checkbox)
Vue.use(Input)
Vue.use(Form)
Vue.use(Modal)
Vue.use(Popconfirm)
Vue.use(List)
Vue.use(Avatar)
Vue.use(Icon)
Vue.use(Menu)
Vue.use(Layout)
Vue.use(DatePicker)
Vue.use(Button)
Vue.use(ConfigProvider)
Vue.use(Drawer);
Vue.use(Steps);
Vue.use(Radio);
Vue.use(Switch);

Message.config({
  duration: 2,
  maxCount: 1,
});

Vue.component('vue-draggable-resizable', VueDraggableResizable);
Vue.filter('textFilter',function(value,format= 200){
  if (value.length > 200){
    return value.slice(0,format) + "......";
  }else {
    return value;
  }
})


new Vue({
  render: h => h(App),
  router,
  store,
  // 实例初始化前，安装全局事件总线
  beforeCreate(){
    Vue.prototype.$bus = this;
  },
}).$mount('#app')
